\hypertarget{serial_8c}{
\section{serial.c File Reference}
\label{serial_8c}\index{serial.c@{serial.c}}
}
A serial library for basic setup and read/write abilities for the UART.  


{\tt \#include \char`\"{}serial.h\char`\"{}}\par
{\tt \#include $<$avr/io.h$>$}\par
{\tt \#include $<$avr/interrupt.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$stdarg.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{serial_8c_b11a5d77be2222a37d0b47e6556251f7}{init\_\-serial} (void)
\item 
void \hyperlink{serial_8c_3a2b24fad7e940735bcb55b9a74664be}{send\_\-byte} (uint8\_\-t value)
\item 
void \hyperlink{serial_8c_80cc9eff037f08cc712f78b971c14a2f}{send\_\-bytes} (uint8\_\-t $\ast$data, uint8\_\-t length)
\end{CompactItemize}


\subsection{Detailed Description}
A serial library for basic setup and read/write abilities for the UART. 

\begin{Desc}
\item[Author:]Robert Breznak, Peter Kalauskas \end{Desc}
\begin{Desc}
\item[Date:]April 4, 2009 \end{Desc}


\subsection{Function Documentation}
\hypertarget{serial_8c_b11a5d77be2222a37d0b47e6556251f7}{
\index{serial.c@{serial.c}!init\_\-serial@{init\_\-serial}}
\index{init\_\-serial@{init\_\-serial}!serial.c@{serial.c}}
\subsubsection[{init\_\-serial}]{\setlength{\rightskip}{0pt plus 5cm}void init\_\-serial (void)}}
\label{serial_8c_b11a5d77be2222a37d0b47e6556251f7}


Initialize the UART for communication with a profile 8N1

\begin{Desc}
\item[Returns:]void \end{Desc}
\begin{Desc}
\item[Author:]Robert Breznak, Peter Kalauskas \end{Desc}
\hypertarget{serial_8c_3a2b24fad7e940735bcb55b9a74664be}{
\index{serial.c@{serial.c}!send\_\-byte@{send\_\-byte}}
\index{send\_\-byte@{send\_\-byte}!serial.c@{serial.c}}
\subsubsection[{send\_\-byte}]{\setlength{\rightskip}{0pt plus 5cm}void send\_\-byte (uint8\_\-t {\em value})}}
\label{serial_8c_3a2b24fad7e940735bcb55b9a74664be}


Send a byte down the UART once the buffer has been cleared

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em value}]the byte to be sent. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}
\begin{Desc}
\item[Author:]Robert Breznak \end{Desc}
\hypertarget{serial_8c_80cc9eff037f08cc712f78b971c14a2f}{
\index{serial.c@{serial.c}!send\_\-bytes@{send\_\-bytes}}
\index{send\_\-bytes@{send\_\-bytes}!serial.c@{serial.c}}
\subsubsection[{send\_\-bytes}]{\setlength{\rightskip}{0pt plus 5cm}void send\_\-bytes (uint8\_\-t $\ast$ {\em data}, \/  uint8\_\-t {\em length})}}
\label{serial_8c_80cc9eff037f08cc712f78b971c14a2f}


Send an array of bytes down the UART once the buffer has been cleared

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]the array of bytes to be sent. \item[{\em length}]the length of the array of bytes. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}
\begin{Desc}
\item[Author:]Peter Kalauskas \end{Desc}
